/**
 * @Author: 健聪
 * @Description: 对象call方法
 * @Date: 2024/01/29
 */
void main() {
  var person = new Person();
  // person.name = "Tom";
  // person.age = 20;
  // person.work();
  // person();
  // person("Test", 30)
  print(person("Test", 30));
}

class Person {
  String? name;
  int? age;

  // void work() {
  //   print("Name is $name, Age is $age");
  // }

  // void call() {
  //   print("Name is $name, Age is $age");
  // }
  // void call(String name, int age) {
  //   print("Name is $name, Age is $age");
  // }
  String call(String name, int age) {
    return "Name is $name, Age is $age";
  }
}
